// pages/test/test.js
Page({

  operation_test: function()  {
    var a = 10;

    a = 10; a *= 10;
    console.log(100 === a);
    a = 10; a /= 5;
    console.log(2 === a);
    a = 10; a %= 7;
    console.log(3 === a);
    a = 10; a += 5;
    console.log(15 === a);
    a = 10; a -= 11;
    console.log(-1 === a);
    a = 10; a <<= 10;
    console.log(10240 === a);
    a = 10; a >>= 2;
    console.log(2 === a);
    a = 10; a >>>= 2;
    console.log(2 === a);
    a = 10; a &= 3;
    console.log(2 === a);
    a = 10; a ^= 3;
    console.log(9 === a);
    a = 10; a |= 3;
    console.log(11 === a);
    
  },

  scroll: function (e) {

    // console.log("==========>e.detail.scrollHeight",e.detail.scrollHeight)
    // console.log("==========>e.detail.scrollWidth",e.detail.scrollWidth)
    
    // console.log(e.detail)
    this.operation_test()

  },

  


  onReady: function () {
    // 创建InnerAudioContext实例
    var audioCtx = wx.createInnerAudioContext()
    // 设置音频资源地址
    // audioCtx.src = 'http://localhost:3000/1.mp3'
    audioCtx.src = '/images/1.mp3'
    // 当开始播放时，输出调试信息
    audioCtx.onPlay(function () {
      console.log('开始播放')
    })
    // 当发生错误时，输出调试信息
    audioCtx.onError(function (res) {
      console.log(res.errMsg)	// 错误信息
      console.log(res.errCode)	// 错误码
    })
    // 开始播放
    audioCtx.play()
  },

  sliderChanging: function (e) {
    console.log(e.detail.value)
  }

})